package com.whfc.ms.api.safety.service.impl;

import com.whfc.common.result.PageData;
import com.whfc.ms.api.safety.service.MsSafetyRectifyService;
import com.whfc.safety.dto.SafetyCheckDTO;
import com.whfc.safety.dto.SafetyRectifyDTO;
import com.whfc.safety.param.SafetyRectifyAddParam;
import com.whfc.safety.param.SafetyRectifyEditParam;
import com.whfc.safety.service.SafetyRectifyService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.Method;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author: hw
 * @date: 2021-10-19 16:10
 * @description: 安全整改单
 */
@Service
public class MsSafetyRectifyServiceImpl implements MsSafetyRectifyService {

    @DubboReference(interfaceClass = SafetyRectifyService.class, version = "1.0.0",
            methods = {@Method(name = "export", async = true, isReturn = false, timeout = 30 * 1000)})
    private SafetyRectifyService safetyRectifyService;

    @Override
    public PageData<SafetyRectifyDTO> list(Integer deptId, Date startTime, Date endTime, Integer pageNum, Integer pageSize) {
        return safetyRectifyService.list(deptId, startTime, endTime, pageNum, pageSize);
    }

    @Override
    public PageData<SafetyCheckDTO> details(Integer rectifyId, Integer pageNum, Integer pageSize) {
        return safetyRectifyService.details(rectifyId, pageNum, pageSize);
    }

    @Override
    public void add(SafetyRectifyAddParam param) {
        safetyRectifyService.add(param);
    }

    @Override
    public void edit(SafetyRectifyEditParam param) {
        safetyRectifyService.edit(param);
    }

    @Override
    public void del(Integer rectifyId) {
        safetyRectifyService.del(rectifyId);
    }


    @Override
    public void export(Integer rectifyId) {
        safetyRectifyService.export(rectifyId);
    }

    @Override
    public void deleteBatch(List<Integer> idList) {
        safetyRectifyService.deleteBatch(idList);
    }
}
